package com.github_dididipapa.mall.product.feign;

import com.github_dididipapa.common.config.FeignConfig;
import com.github_dididipapa.common.to.SkuReductionTo;
import com.github_dididipapa.common.to.SpuBoundTo;
import com.github_dididipapa.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        name = "mall-gateway",
        url = "http://127.0.0.1:88",
        contextId = "couponFeignService",
        configuration = FeignConfig.class
)

public interface CouponFeignService {

    @PostMapping("api/coupon/spubounds/saveSpu/bounds")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);

    @PostMapping("api/coupon/skufullreduction/saveSkuReduction")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);
}
